package com.rockxin.cat.utils;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;

import com.rockxin.cat.activity.AddBankCardActivity;
import com.rockxin.cat.activity.BidDetailsActivity;
import com.rockxin.cat.activity.BorrowManageActivity;
import com.rockxin.cat.activity.CapitalLogActivity;
import com.rockxin.cat.activity.DepositActivity;
import com.rockxin.cat.activity.GoFyPayActivity;
import com.rockxin.cat.activity.LendRecordActivity;
import com.rockxin.cat.activity.LoginActivity;
import com.rockxin.cat.activity.MyBankCardActivity;
import com.rockxin.cat.activity.MyRedPacketActivity;
import com.rockxin.cat.activity.PersonalDataActivity;
import com.rockxin.cat.activity.RealNameActivity;
import com.rockxin.cat.activity.RechargeActivity;
import com.rockxin.cat.activity.RecommendAwardActivity;
import com.rockxin.cat.activity.ResetLoginPasswdActivity;
import com.rockxin.cat.activity.SettingsActivity;

/**
 * Created by Lans on 2018/3/2.
 */
public class JumpActivityManager {

    private static JumpActivityManager instance;

    // 单例模式中获取唯一的MyApplication实例
    public static JumpActivityManager getInstance() {
        if (null == instance) {
            instance = new JumpActivityManager();
        }
        return instance;
    }

    /**
     * 跳转设置
     *
     * @param context
     */
    public void jumpSettings(Context context) {
        Intent intent = new Intent(context, SettingsActivity.class);
        context.startActivity(intent);
    }

    /**
     * 跳转到个人资料
     *
     * @param context
     */
    public void jumpPersonalData(Context context) {
        Intent intent = new Intent(context, PersonalDataActivity.class);
        context.startActivity(intent);
    }

    /**
     * 跳转到资金日志
     *
     * @param context
     */
    public void jumpCapitalLogActivity(Context context) {
        Intent intent = new Intent(context, CapitalLogActivity.class);
        context.startActivity(intent);
    }

    /**
     * 跳转到借款管理
     *
     * @param context
     */
    public void jumpBorrowManageActivity(Context context) {
        Intent intent = new Intent(context, BorrowManageActivity.class);
        context.startActivity(intent);
    }

    /**
     * 跳转到我的红包
     *
     * @param context
     */
    public void jumpMyRedPacketActivity(Context context) {
        Intent intent = new Intent(context, MyRedPacketActivity.class);
        context.startActivity(intent);
    }

    /**
     * 跳转到标的详情
     *
     * @param context
     */
    public void jumpBidDetailsActivity(Context context) {
        Intent intent = new Intent(context, BidDetailsActivity.class);
        context.startActivity(intent);
    }

    /**
     * 推荐奖励
     *
     * @param context
     */
    public void jumpRecommendAwardActivity(Context context) {
        Intent intent = new Intent(context, RecommendAwardActivity.class);
        context.startActivity(intent);
    }

    /**
     * 出借记录
     *
     * @param context
     */
    public void jumpLendRecordActivity(Context context) {
        Intent intent = new Intent(context, LendRecordActivity.class);
        context.startActivity(intent);
    }

    /**
     * 提现
     *
     * @param context
     */
    public void jumpDepositActivity(Context context) {
        Intent intent = new Intent(context, DepositActivity.class);
        context.startActivity(intent);
    }

    /**
     * 充值
     *
     * @param context
     */
    public void jumpRechargeActivity(Context context) {
        Intent intent = new Intent(context, RechargeActivity.class);
        context.startActivity(intent);
    }

    /**
     * 我的银行卡
     *
     * @param context
     */
    public void jumpMyBankCardActivity(Context context) {
        Intent intent = new Intent(context, MyBankCardActivity.class);
        context.startActivity(intent);
    }

    /**
     * 添加银行卡
     */
    public void jumpAddBankCardActivity(Context context) {
        Intent intent = new Intent(context, AddBankCardActivity.class);
        context.startActivity(intent);
    }

    /**
     * 实名认证
     *
     * @param context
     */
    public void jumpRealNameActivity(Context context) {
        Intent intent = new Intent(context, RealNameActivity.class);
        context.startActivity(intent);
    }

    /**
     * 修改登录密码
     *
     * @param context
     */
    public void jumpResetLoginPasswdActivity(Context context) {
        Intent intent = new Intent(context, ResetLoginPasswdActivity.class);
        context.startActivity(intent);
    }

    /**
     * 跳转登录
     *
     * @param context
     */
    public void jumpLoginActivity(Context context) {
        Intent intent = new Intent(context, LoginActivity.class);
        context.startActivity(intent);
    }

    /**
     * 支付
     *
     * @param context
     * @param bundle
     */

    public void jumpGoFyPayActivity(Context context, Bundle bundle) {
        Intent intent = new Intent(context, GoFyPayActivity.class);
        intent.putExtras(bundle);
        context.startActivity(intent);
    }
}